package oop4.car;

public class Car {
    String brand;
    int price;  //单位为万
    double youHao;
    String color;

    public Car(String brand, int price, double youHao, String color) {
        this.brand = brand;
        this.price = price;
        this.youHao = youHao;
        this.color = color;
    }

    public void show() {
        System.out.println("汽车品牌是" + brand + ",价格是" + price + "万元");
        System.out.println("颜色是" + color + ",油耗是" + youHao);
    }

    public void start() {
        System.out.println(brand + "汽车正常启动了");
    }

    public void speedUp() {
        System.out.println(brand + "汽车正常加速了");
    }

    public void brake() {
        System.out.println(brand + "汽车正常刹车了");
    }


    public void sound() {
        System.out.println(brand + "汽车鸣笛");
        System.out.println("滴---滴---滴---滴---滴");
    }

}

